package com.retail.xiaocui.server.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.retail.xiaocui.server.mapper.EarlyMapper;
import com.retail.xiaocui.common.domain.Early;
import com.retail.xiaocui.server.service.EarlyService;

/**
 * 预警值设置Service业务层处理
 *
 * @author retail
 * @date 2024-02-29
 */
@Service
public class EarlyServiceImpl implements EarlyService
{
    @Autowired
    private EarlyMapper earlyMapper;

    /**
     * 查询预警值设置
     *
     * @param warningId 预警值设置主键
     * @return 预警值设置
     */
    @Override
    public Early selectEarlyByWarningId(Long warningId)
    {
        return earlyMapper.selectEarlyByWarningId(warningId);
    }

    /**
     * 查询预警值设置列表
     *
     * @param early 预警值设置
     * @return 预警值设置
     */
    @Override
    public List<Early> selectEarlyList(Early early)
    {
        return earlyMapper.selectEarlyList(early);
    }

    /**
     * 新增预警值设置
     *
     * @param early 预警值设置
     * @return 结果
     */
    @Override
    public int insertEarly(Early early)
    {
        return earlyMapper.insertEarly(early);
    }

    /**
     * 修改预警值设置
     *
     * @param early 预警值设置
     * @return 结果
     */
    @Override
    public int updateEarly(Early early)
    {
        return earlyMapper.updateEarly(early);
    }

    /**
     * 批量删除预警值设置
     *
     * @param warningIds 需要删除的预警值设置主键
     * @return 结果
     */
    @Override
    public int deleteEarlyByWarningIds(Long[] warningIds)
    {
        return earlyMapper.deleteEarlyByWarningIds(warningIds);
    }

    /**
     * 删除预警值设置信息
     *
     * @param warningId 预警值设置主键
     * @return 结果
     */
    @Override
    public int deleteEarlyByWarningId(Long warningId)
    {
        return earlyMapper.deleteEarlyByWarningId(warningId);
    }
}
